package com.wyw.springcloud.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.client.RestTemplate;

/**
 * 文件介绍
 *
 * @Author： Mr Wu （yewen.wu.china.gmail.com）
 * @Date: 2020/9/24 10:11
 */
@RestController
public class Controller {

    @Autowired
    private RestTemplate restTemplate;

    @GetMapping("/sayHi")
    public String sayHi(){
        return restTemplate.getForObject("http://eureka-client/sayHi", String.class);
    }

}
